﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using RbmlVisualizer.Data.Link;

namespace RbmlVisualizer.Data
{
    public class ClassDiagram : IClassDiagram
    {
        public ClassDiagram(string type)
        {
            type.ToUpper();
            switch (type)
            {
                case "UML":
                    this.ClassDiagramType = Data.ClassDiagramType.Uml;
                    break;
                case "RBML":
                    this.ClassDiagramType = Data.ClassDiagramType.Rbml;
                    break;
                default:
                    this.ClassDiagramType = Data.ClassDiagramType.None;
                    break;
            }
            this.Links = new List<ILink>();
            this.Entities = new List<IEntity>();
        }

        public ClassDiagram()
        {
            this.Links = new List<ILink>();
            this.Entities = new List<IEntity>();
        }
        
        public ClassDiagramType ClassDiagramType { get; set; }
        public ICollection<IEntity> Entities { get; set; }
        public ICollection<ILink> Links { get; set; }
    }

    public enum ClassDiagramType
    {
        None = 0,
        Uml,
        Rbml
    }
}
